package com.mkx.application.dto.request;

import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.util.UUID;

/**
 * 创建租户用户关联请求DTO
 */
@Data
public class CreateTenantUserRequest {
    
    @NotBlank(message = "租户ID不能为空")
    private String tenantId;
    
    @NotBlank(message = "用户ID不能为空")
    private String userId;
    
    @NotBlank(message = "角色ID不能为空")
    private String roleId;
    
    /**
     * 验证ID格式是否为UUID
     */
    public boolean isValidIdFormat(String id) {
        try {
            UUID.fromString(id);
            return true;
        } catch (IllegalArgumentException e) {
            return false;
        }
    }
}